package com.yswl.pri.picture.adapter;

import android.content.Context;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.yswl.pri.R;
import com.yswl.pri.picture.PictureLoftPageListFragment;

import java.util.List;

import yswl.com.klibrary.base.BaseRecyclerAdapter;
import yswl.com.klibrary.base.BaseViewHolder;
import yswl.com.klibrary.http.okhttp.MScreenUtils;
import yswl.com.klibrary.util.L;

public class ImagsListAdapterLoftDetail extends BaseRecyclerAdapter<String> {

    int widht;
    int height;

    public ImagsListAdapterLoftDetail(Context mContext, List<String> mList, int itemLayoutId) {
        super(mContext, mList, itemLayoutId);
        widht = MScreenUtils.getScreenWidth(mContext);
        height = MScreenUtils.getScreenHeight(mContext);
    }

    @Override
    public void onBind(BaseViewHolder holder, String imag, int position) {
        ImageView imageView = holder.findById(R.id.image);
        L.e(PictureLoftPageListFragment.TAG, "img detail url: " + imag);
        Glide.with(mWeakContext.get())
                .load(imag).thumbnail(0.01f)
                .into(imageView);
    }
}